{include file=member.header.html}
<script type="text/javascript">
function submitDdata()
{
	var coupon_sn = $('#coupon_sn').val();
	var url = REAL_SITE_URL+"/index.php?app=my_coupon&act=bind";
	$.post(url,{coupon_sn:coupon_sn},function(data){
		if(data == true){
			msg("{$lang.handle_ok}");
			setTimeout(function(){
				window.location.href=REAL_SITE_URL+"/index.php?app=my_coupon";
			},1500);
		}  
		else if(data == 2)
		{
			errormsg('{$lang.coupon_sn_not_empty}');
		}
		else
		{
			errormsg('{$lang.coupon_sn_not_empty_invalid}');
		}
	},"json");

}
</script>
<div id="page-my-coupon">
	<div class="record-coupon page-body">
			<input  type="text" name="coupon_sn"  id="coupon_sn" placeholder="{$lang.coupon_sn}" />
			<input type="button" onclick="submitDdata();" class="btn2" value="{$lang.submit}" />
	</div>
</div>